package com.fy.merchant.controller;

import com.fy.common.api.CommonResult;
import com.fy.merchant.common.vo.IdAndMerchantid;
import com.fy.merchant.reqvo.LogisticsVo;
import com.fy.merchant.reqvo.QueryOrderVo;
import com.fy.merchant.resvo.OrderIdVo;
import com.fy.merchant.resvo.OrderListVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = "订单管理")
@RequestMapping("order")
public class OrderController {
    @ApiOperation("查询所有")
    @GetMapping(value = "findAll")
    public CommonResult findAll(@RequestBody QueryOrderVo queryOrderVo) {
        return CommonResult.success(new OrderListVo());
    }

    @ApiOperation("id查询")
    @GetMapping(value = "findId")
    public CommonResult findId(@RequestBody IdAndMerchantid idAndMerchantid) {
        return CommonResult.success(new OrderIdVo());
    }

    @ApiOperation("取消订单")
    @GetMapping(value = "cancel")
    public CommonResult cancel(@RequestBody IdAndMerchantid idAndMerchantid) {
        
        return CommonResult.success();
    }

    @ApiOperation("查看物流")
    @GetMapping(value = "checkthelogistics")
    public CommonResult checkTheLogistics(@RequestBody IdAndMerchantid idAndMerchantid) {
        return CommonResult.success();
    }

    @ApiOperation("发货")
    @PostMapping(value = "delivergoods")
    public CommonResult deliverGoods(@RequestBody LogisticsVo logisticsVo) {
        return CommonResult.success();
    }
}
